/*
 */
package it.pride.primefacesShowcase.controller;

/**
 *
 * @author eluibon
 */
public class Check {

    private String label ;
    private Boolean ok ;
    private Boolean nok ;

    public Check(String label) {
        this.label = label;
        ok = false ;
        nok = false ;
    }

    public String getLabel() {
        return label;
    }

    public void setLabel(String label) {
        this.label = label;
    }

    public Boolean getOk() {
        return ok;
    }

    public void setOk(Boolean ok) {
        this.ok = ok;
    }

    public Boolean getNok() {
        return nok;
    }

    public void setNok(Boolean nok) {
        this.nok = nok;
    }

    @Override
    public String toString() {
        
        String res = label + ", result : ";
        if ( ok == false && nok == false )
            return res + "not performed" ;
        if ( ok == true && nok == false )
            return res + "OK" ;
        if ( ok == false && nok == true )
            return res + "NOK" ;        
        
        return res + "invalid" ;                
    }
}
